package com.cgtong.android.mvp.contract;

import com.zhouyou.http.callback.SimpleCallBack;
import com.zhouyou.http.exception.ApiException;
import com.zhouyou.http.subsciber.IProgressDialog;

/**
 * Created by Sky.Bing on 2017/10/23.
 */

public interface LoginContract {
    interface View {
        void sendValidCodeError(ApiException e);

        void breakClickValidCode();

        void backActivity(String token);

        void onLoginError(ApiException e);
    }

    interface Model {
        void sendValidCode(String phone, SimpleCallBack<Object> callBack);

        void doLoginByDialog(String phone, String password, String mobileInfo, IProgressDialog dialog, SimpleCallBack<String> callBack);

        void doLoginByDialog(String phone, String password, String mobileInfo, String validCode, IProgressDialog dialog, SimpleCallBack<String> callBack);
    }

    interface Presenter {
        void sendValidCode(String phone);

        void doLogin(String phone, String password, String mobileInfo, IProgressDialog dialog);

        void doLogin(String phone, String password, String mobileInfo, String validCode, IProgressDialog dialog);
    }
}